package com.hudsonmq.spring.domain.produce;

import java.util.Objects;

/**
 * @Author: 渔小鲤
 * @DateTime: 2025/7/27 11:18
 **/
public class TopicQueueInfo {
    /**
     * broker名称
     */
    private String brokerName;

    /**
     * topic名称
     */
    private String topicName;

    /**
     * 队列Id
     */
    private Integer queueId;

    public TopicQueueInfo(String brokerName, String topicName, Integer queueId) {
        this.brokerName = brokerName;
        this.topicName = topicName;
        this.queueId = queueId;
    }

    public String getBrokerName() {
        return brokerName;
    }

    public void setBrokerName(String brokerName) {
        this.brokerName = brokerName;
    }

    public String getTopicName() {
        return topicName;
    }

    public void setTopicName(String topicName) {
        this.topicName = topicName;
    }

    public Integer getQueueId() {
        return queueId;
    }

    public void setQueueId(Integer queueId) {
        this.queueId = queueId;
    }

    @Override
    public boolean equals(Object o) {
        if (o == null || getClass() != o.getClass()) return false;
        TopicQueueInfo that = (TopicQueueInfo) o;
        return Objects.equals(brokerName, that.brokerName) && Objects.equals(topicName, that.topicName) && Objects.equals(queueId, that.queueId);
    }

    @Override
    public int hashCode() {
        return Objects.hash(brokerName, topicName, queueId);
    }
}
